#pragma once
#include "Common.h"
class ThreadCache
{
public:
	void* Allocate(size_t size);

	void Deallocate(void* ptr,size_t size);

	void* ApplyFromCentralCache(size_t index, size_t size);

	void ReturnLongList(FreeList& list, size_t size);
private:
	FreeList _freeLists[FREELISTNUM];
};

// TLS thread local storage
static _declspec(thread) ThreadCache* pTLSThreadCache = nullptr;